{extend name="layout"}

{block name="content"}
	<p><a href="{:url('admin/activity/create')}" class="btn btn-primary">添加活动</a></p>
	<table class="table table-bordered table-hover text-center">
		<thead>
		    <th>封面图</th>
			<th>标题</th>
			<th>时间</th>
			<th>场馆</th>
			<th>票价</th>
			<th>积分兑换</th>
			
			<th>首页头条</th>
			<th>首页推荐</th>
			<th>发布时间</th>
			<th>当前状态</th>
			<th>操作</th>
		</thead>
		<tbody>
			{foreach $datas as $v}
				<tr>
					<td><img src="/static/uploads/{$v->cover}" width="30" height="30"></td>
					<td>{$v->title}</td>
					<td>{$v->begin_time}</td>
					<td>{$v->venues}</td>
					<td>{$v->fare?? '免费'}</td>
					<td>{$v->integral?? '不允许兑换'}</td>
					<td>{$v->is_index_top ? '是' : '否'}</td>
					<td>{$v->is_index_recommend? '是' : '否'}</td>
					<td>{$v->created_at}</td>
					<td>{$status[$v->status]}</td>
					<td>
						<a href="{:url('admin/activity/edit', ['id' => $v->id])}" class="far fa-edit text-dark"></a>
						<a href="javascript:;" class="far fa-trash-alt text-dark ml-3" data-url="{:url('admin/activity/delete',['id' => $v->id])}"></a>
					</td>
					</td>
				</tr>
			{/foreach}
		</tbody>
	</table>
{/block}